# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libxi
pkgver=1.7.10
pkgrel=0
pkgdesc="X11 Input extension library"
url="https://www.x.org"
arch="all"
license="MIT AND X11"
options="!check"  # No test suite.
subpackages="$pkgname-dev $pkgname-doc"
depends=
makedepends="
	xorgproto
	libx11-dev
	libxext-dev
	libxfixes-dev
	util-macros
	xmlto
	"
source="https://www.x.org/releases/individual/lib/libXi-$pkgver.tar.bz2"

builddir="$srcdir"/libXi-$pkgver
build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-xmlto \
		--without-fop \
		--disable-static
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="591f0860bf5904897587c4990d6c852f3729a212d1ef390362d41242440e078221877c31db2232d5cc81727fe97f4e194b077f7de917e251e60641bbd06ee218  libXi-1.7.10.tar.bz2"
